package com.ymttest.database.mongo.converter;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.core.convert.converter.Converter;

import com.ymttest.utils.YMTDateUtil;

public class DateToStringConverter implements Converter<Date, String> {

	@Override
	public String convert(Date source) {

		SimpleDateFormat format = new SimpleDateFormat(YMTDateUtil.YMDHMSS);

		return format.format(source);

	}

}
